package com.lagou.stage02;

public class UserConsumeData{
    private double sum_duration;
    private double sum_internet_traffic;
    private double sum_monthly_consume;

    public UserConsumeData(PhoneCard pc, ServiceAbstract ns, ServiceAbstract cs) {
        this.sum_duration = pc.getDuration();
        this.sum_internet_traffic = pc.getInternetTraffic();
        this.sum_monthly_consume = ns.getMonthlyCharges() + cs.getMonthlyCharges();
    }

    public double getSumDuration() {
        return sum_duration;
    }

    public double getSumInternetTraffic() {
        return sum_internet_traffic;
    }

    public double getSumMonthlyConsume() {
        return sum_monthly_consume;
    }

    public void show() {
        System.out.println("总通话时长：" + sum_duration + "分钟， 总上网流量：" + sum_internet_traffic + "GB，本月总资费：" + sum_monthly_consume + "元。");
    }
}
